package com.ruoyi.system.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 隔离点信息
 * @TableName isolation_info
 */
@Data
@TableName(value ="isolation_info")
public class IsolationInfo implements Serializable {
    /**
     * 隔离信息唯一标识，主键，不可为空
     */
    @Excel(name = "隔离点ID", prompt = "隔离点ID")
    @TableId(type = IdType.AUTO)
    private Long isolationId;

    /**
     * 隔离点名称
     */
    @Excel(name = "隔离点名称", prompt = "隔离点名称")
    private String isolationName;

    /**
     * 隔离点类型1.医院隔离病房、2.集中隔离点、3.居民小区隔离区
     */
    @Excel(name = "隔离点类型", prompt = "隔离点类型")
    private Integer facilityType;

    /**
     * 隔离点位置
     */
    @Excel(name = "隔离点位置", prompt = "隔离点位置")
    private String isolationAddress;
    /**
     * 隔离点经度
     */
    @Excel(name = "隔离点经度", prompt = "隔离点经度")
    private String isolationLongitude;

    /**
     * 隔离点纬度
     */
    @Excel(name = "隔离点纬度", prompt = "隔离点纬度")
    private String isolatedLatitude;

    /**
     * 0正常，1关闭
     */
    @Excel(name = "隔离点状态", prompt = "隔离点状态")
    private String status;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT)//创建与修改时自动填充
    @Excel(name = "创建时间", prompt = "创建时间")
    private Date createTime;

    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT_UPDATE)//创建与修改时自动填充
    @Excel(name = "更新时间", prompt = "更新时间")
    private Date updateTime;

    /**
     * 逻辑删除1删除0正常
     */
    private Integer isDelete;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        IsolationInfo other = (IsolationInfo) that;
        return (this.getIsolationId() == null ? other.getIsolationId() == null : this.getIsolationId().equals(other.getIsolationId()))
            && (this.getIsolationName() == null ? other.getIsolationName() == null : this.getIsolationName().equals(other.getIsolationName()))
            && (this.getFacilityType() == null ? other.getFacilityType() == null : this.getFacilityType().equals(other.getFacilityType()))
            && (this.getIsolationLongitude() == null ? other.getIsolationLongitude() == null : this.getIsolationLongitude().equals(other.getIsolationLongitude()))
            && (this.getIsolatedLatitude() == null ? other.getIsolatedLatitude() == null : this.getIsolatedLatitude().equals(other.getIsolatedLatitude()))
            && (this.getIsolationAddress() == null ? other.getIsolationAddress() == null : this.getIsolationAddress().equals(other.getIsolationAddress()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getIsDelete() == null ? other.getIsDelete() == null : this.getIsDelete().equals(other.getIsDelete()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getIsolationId() == null) ? 0 : getIsolationId().hashCode());
        result = prime * result + ((getIsolationName() == null) ? 0 : getIsolationName().hashCode());
        result = prime * result + ((getFacilityType() == null) ? 0 : getFacilityType().hashCode());
        result = prime * result + ((getIsolationLongitude() == null) ? 0 : getIsolationLongitude().hashCode());
        result = prime * result + ((getIsolatedLatitude() == null) ? 0 : getIsolatedLatitude().hashCode());
        result = prime * result + ((getIsolationAddress() == null) ? 0 : getIsolationAddress().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getIsDelete() == null) ? 0 : getIsDelete().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", isolationId=").append(isolationId);
        sb.append(", isolationName=").append(isolationName);
        sb.append(", facilityType=").append(facilityType);
        sb.append(", isolationLongitude=").append(isolationLongitude);
        sb.append(", isolatedLatitude=").append(isolatedLatitude);
        sb.append(", isolationAddress=").append(isolationAddress);
        sb.append(", status=").append(status);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", isDelete=").append(isDelete);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}
